<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<script type="text/javascript">
	$(function(){
		$("#content").click(function(){
			alert("判断用户");
			return;
		});
		
	});
</script>
<!-- 分享插件 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css">
<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=1&amp;lang=zh"></script>
<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
<div class="data_list">
	<div class="data_list_title">
		<span class="glyphicon glyphicon-user" style="width:18px;"></span>博客信息
	</div>
	<div>
		<!-- 标题 -->
		<div class="blog_title"><h3><strong>${blog.title }</strong></h3></div>
		<!-- 分享 -->
		<div style="padding-left:330px;padding-bottom:20px;padding-top:10px;">
			<div class="bshare-custom">
				<a title="分享到QQ空间" class="bshare-qzone"></a>
				<a title="分享到新浪微博" class="bshare-sinaminiblog"></a>
				<a title="分享到人人网" class="bshare-renren"></a>
				<a title="分享到腾讯微博" class="bshare-qqmb"></a>
				<a title="分享到网易微博" class="bshare-neteasemb"></a>
				<a title="更多平台" class="bshare-more bshare-more-icon more-style-addthis"></a>
				<span class="BSHARE_COUNT bshare-share-count">0</span>
			</div>
		</div>
		<!-- 博客时间--类别--浏览 --评论 -->
		<div class="blog_info">
			发布时间:『<fmt:formatDate value="${blog.releaseDate }" type="date" pattern="yyyy-MM-dd HH:mm"/>』&nbsp;&nbsp;
			博客类别:『${blog.blogType.typeName }』&nbsp;&nbsp;
			阅读(${blog.clickHit}) 评论(${blog.replyHit})
		</div>
		<!-- 博客内容 -->
		<div class="blog_content">
			${blog.content }
		</div>
		<!-- 关键字 -->
		<div class="blog_keyWord">
			<font><strong>关键字</strong></font>
			<!-- jsp判断选择 -->
			<c:choose>
				<c:when test="${keyWords==null }">
					&nbsp;&nbsp;暂无
				</c:when>
				<c:otherwise>
					<c:forEach items="${keyWords }" var="i">
						&nbsp;&nbsp;
						<a href="${pageContext.request.contextPath }/blog/query.html?query=${keyWords}" target="b_blank">${keyWord }</a>&nbsp;&nbsp;
					</c:forEach>
				</c:otherwise>
			</c:choose>
		</div>
		<!-- 上一篇 与 下一篇 -->
		<div class="blog_lastAndNextPage">
			${pageCode }
		</div>
	</div>
</div>
<!-- 评论栏  头-->
<div class="data_list">
	<div class="data_list_title">
		<span class="glyphicon glyphicon-thumbs-up" style="width:18px;"></span>评论信息
		<!-- 判断评论数是否多   10条-->
		<c:if test="${commentListCount>10 }">
			<a href="javascript:showOtherComment()" style="float:right;padding-right:40px;">显示所有评论</a>
		</c:if>
	</div>
	<!-- 评论内容 -->
	<div class="commentDatas">
		<c:choose>
			<c:when test="${commentListCount==0 }">暂无评论</c:when>
			<c:otherwise>
				<!-- 用 varStatus 评论楼层显示 -->
				<c:forEach items="${commentList }" var="i" varStatus="status">
					<c:choose>
						<c:when test="${status.index<10 }">
							<!-- 评论消息 -->
							<div class="comment">
								<span>${status.index+1 }楼&nbsp;&nbsp;&nbsp;&nbsp;
									<font>${i.user.nickName }</font>:${i.content }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									『<fmt:formatDate value="${i.commentDate }" type="date" pattern="yyyy-MM-dd HH:mm"/>』
								</span>
							</div>
						</c:when>
					</c:choose>
				</c:forEach>
			</c:otherwise>
		</c:choose>
	</div>
</div>

<!-- 发表评论 -->
<div class="data_list">
	<div class="data_list_title">
		<span class="glyphicon glyphicon-thumbs-up" style="width:18px;"></span>发表评论
	</div>
	<div class="publish_comment">
		<div>
			<textarea style="width: 100%" rows="3" id="content" name="content" placeholder="来说两句吧..."></textarea>
		</div>
	</div>
</div>

